﻿using System;
using System.Drawing;

namespace PlantsZombies.Common.Plant
{
    [PlantZombie(SpeciesType.Sharpshooter)]
    public class GameSharpshooter : PlantObject
    {
        public GameSharpshooter(ImageObject[] images)
            : base(images, SpeciesType.PeaShooter, 12, 3, new Size(130, 130))
        {
        }
        protected override void PlayBody(IntPtr hdc)
        {
            var image = _images[_curPlayIndex];
            GDI32.DrawImageTransparenc(hdc, image.BitmapPtr, Location.X + (CellWidth - Size.Width) / 2, Location.Y - (CellHeight) / 2, image.Width, image.Height, Size.Width, Size.Height);
            if (++_curPlayIndex >= _images.Length)
                _curPlayIndex = 0;
        }
    }
}
